const path = require('path')

module.exports = {
    entry: {
        index: './src/index.js',
        asyncTest: './src/asyncTest.js'
    },
    mode: 'development',
    output: {
        path: path.resolve(__dirname, './dist'),
        /*获取entry的name值*/
        filename: '[name].bundle.js',
        clean: true
    },
    module: {
        rules: [
            // 提前对css文件类型进行打包声明，需要什么加载器来识别css文件
            {
                test: /\.css$/i,
                use: ['style-loader', 'css-loader'],
            }
        ]
    }
}